/*    
    OpenMheg - A free MHEG-5 library
    Copyright (C) 2008 Dharmesh Malam

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;

using Core.Model.Data.Generics;
using Core.Model.Data;
using Core.Model;

namespace Engine
{
    public static class MHEGConstants
    {
        private const String identifier = "FEG001103 MHGFEG056 DSMFEG017";

        public static String Identifier
        {
            get { return Engine.MHEGConstants.identifier; }
        } 
        
        private static Rectangle screenArea = new System.Drawing.Rectangle( new Point( 0, 0 ), new Size( 720, 576 ) );

        public static Rectangle ScreenArea
        {
            get { return screenArea; }
            //set { screenArea = value; }
        }

        private static OctetString defaultFont = new OctetString("rec://font/uk1");

        public static OctetString DefaultFont
        {
            get { return Engine.MHEGConstants.defaultFont; }
            set { Engine.MHEGConstants.defaultFont = value; }
        }

        private static FontAttributes defaultFontAttributes = new FontAttributes( 24,28, FontStyle.Regular, 0 );

        public static FontAttributes DefaultFontAttributes
        {
            get
            {
                return Engine.MHEGConstants.defaultFontAttributes;
            }
            // set { Engine.MHEGContants.defaultFontAttributes = value; }
        }


       // private static Font DefaultFont ()
       // {
            //Font font = new Font( "TiresiasScreenfont", 24, FontStyle.Regular );
            //font.Height = 28;
         //   return 
       // }

        private static String defaultFontName = "TiresiasScreenfont";

        public static String DefaultFontName
        {
            get { return Engine.MHEGConstants.defaultFontName; }
            //set { Engine.MHEGContants.defaultFontName = value; }
        }

        private static int defaultFontSize = 24;

        public static int DefaultFontSize
        {
            get { return Engine.MHEGConstants.defaultFontSize; }
            // set { Engine.MHEGContants.defaultFontSize = value; }
        }

        private static int defaultLineSpacing = 28;

        public static int DefaultLineSpacing
        {
            get { return Engine.MHEGConstants.defaultLineSpacing; }
            //set { Engine.MHEGContants.defaultLineSpacing = value; }
        }

        private static int defaultLetterSpace = 0;

        public static int DefaultLetterSpace
        {
            get { return Engine.MHEGConstants.defaultLetterSpace; }
            // set { Engine.MHEGContants.defaultLetterSpace = value; }
        }

        private static GenericColour defaultTextColour = new GenericColour(new Colour(0,0,0,0));//"White"

        public static GenericColour DefaultTextColour
        {
            get { return Engine.MHEGConstants.defaultTextColour; }
            //set { Engine.MHEGContants.defaultTextColour = value; }
        }

        private static GenericColour desktopColour = new GenericColour(new Colour(255, 255, 255, 0));//Black 

        public static GenericColour DesktopColour
        {
            get { return Engine.MHEGConstants.desktopColour; }
            //set { Engine.MHEGContants.desktopColour = value; }
        }

        private static GenericColour defaultBackgroundColour = new GenericColour(new Colour(0, 0, 0, 255));//Transparent);

        public static GenericColour DefaultBackgroundColour
        {
            get { return Engine.MHEGConstants.defaultBackgroundColour; }
            //set { Engine.MHEGContants.defaultBackgroundColour = value; }
        }

        public static String GetKeyName ( int key )
        {
            switch ( key )
            {
                case 1:
                    return "Up";
                    
                case 2:
                    return "Down";
                    
                case 3:
                    return "Left";
                    
                case 4:
                    return "Right";
                    
                case 5:
                case 6:
                case 7:
                case 8:
                case 9:
                case 10:
                case 11:
                case 12:
                case 13:
                case 14:
                    return ( key-5 ).ToString();
                    
                case 15:
                    return "OK";
                    
                case 16:
                    return "Cancel";
                    
                case 17:
                    return "Help";
                    
                case 100:
                    return "Red";
                    
                case 101:
                    return "Green";
                    
                case 102:
                    return "Yellow";
                    
                case 103:
                    return "Blue";
                    
                case 104:
                    return "Text";
                    
                default:
                    return "Unkown key";
                    
           }
        }
    }
}
